/*
 * 项目名称:    wms-server-jeecg
 * 创建人员:    FanZhiwen
 * 创建时间:    2023-10-18
 */
package org.jeecg.modules.flow.callback.inbound.order;

import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.modules.business.job.service.PurchaseNoticeService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * 入库提交校验
 *
 * @author FanZhiwen
 * @version 1.0.0
 * @since 2023-10-18
 */
@RestController
@RequestMapping("/valid/test")
@RequiredArgsConstructor
public class ValidTestController extends JeecgController {
    private final InBoundBeanUtils inBoundBeanUtils;
    private final PurchaseNoticeService purchaseNoticeService;
    @ApiOperation(value = "入库提交校验测试", notes = "入库提交校验测试")
    @GetMapping(value = "/submit")
    public Result<Map<String, List<String>>> inSubmit(String id) {
        Map<String, List<String>> valid = inBoundBeanUtils.valid(id);
        return Result.ok(valid);
    }
    @ApiOperation(value = "测试过账通知定时任务", notes = "测试过账通知定时任务")
    @GetMapping(value = "/purchaseNotice")
    public Result<Void> purchaseNotice(String id) {
        purchaseNoticeService.purchaseNotice();
        return Result.ok();
    }
}
